package interfaces;

/**
 * This abstract class should be implemented by every graphic object,
 * which will not be in static position.
 * 
 * @author Tomas Zima
 */
public abstract class GraphicObject implements IDrawable
{
	/**
	 * Constructor.
	 */
	public GraphicObject()
	{
		//
	}
	
	/**
	 * Constructor.
	 * 
	 * @param x
	 * @param y
	 */
	public GraphicObject(int x, int y)
	{
		this();
		setXY(x, y);
	}
	
	/**
	 * Sets coordinates of object.
	 * 
	 * @param x
	 * @param y
	 */
	public void setXY(int x, int y)
	{
		this.x = x;
		this.y = y;
	}
	
	/**
	 * Returns coordinate in X axis.
	 * 
	 * @return
	 */
	public int getX()
	{
		return x;
	}
	
	/**
	 * Returns coordinate in Y axis.
	 * 
	 * @return
	 */
	public int getY()
	{
		return y;
	}
	
	// Attributes
	protected int x;
	protected int y;
}
